<template>
  <div id="userLayout" :class="['user-layout-wrapper', isMobile && 'mobile']">
    <div class="container">
      <div class="loginbox">
        <div class="title">
          <span class="title_up">招商系统2.0</span>
          <span class="title_down">业务与数据并驱的智慧招商产品</span>
        </div>
        <div class="login_main flex col_center">
          <img :src="require('@/assets/imgs/login_left.png')" alt="" srcset="" class="loginimg" />
          <div class="login_ipts">
            <router-view />
          </div>
        </div>
        <div class="copyright">© CopyRight 2021 乐推团队 TEAM PROVIDES TECHNICAL SUPPORT.</div>
      </div>
    </div>
  </div>
</template>

<script>
import { deviceMixin } from '@/store/device-mixin'

export default {
  name: 'UserLayout',
  mixins: [deviceMixin],
  mounted () {
    document.body.classList.add('userLayout')
  },
  beforeDestroy () {
    document.body.classList.remove('userLayout')
  }
}
</script>

<style lang="less" scoped>
#userLayout.user-layout-wrapper {
  height: 100%;

  &.mobile {
    .container {
      .main {
        max-width: 368px;
        width: 98%;
      }
    }
  }

  .container {
    width: 100%;
    min-height: 100%;
    //background-color: #f0f1f4;
    background: #f0f2f5 url(~@/assets/background.svg) no-repeat 50%;
    background-size: 100%;
    padding: 110px 0 144px;
    position: relative;

    a {
      text-decoration: none;
    }

    .main {
      min-width: 260px;
      // width: 368px;
      margin: 0 auto;
      display: flex;
      justify-content: space-around;
      flex-wrap: wrap;
      align-items: center;
    }

    .footer {
      position: absolute;
      width: 100%;
      bottom: 0;
      padding: 0 16px;
      margin: 48px 0 24px;
      text-align: center;

      .links {
        margin-bottom: 8px;
        font-size: 14px;
        a {
          color: rgba(0, 0, 0, 0.45);
          transition: all 0.3s;
          &:not(:last-child) {
            margin-right: 40px;
          }
        }
      }
      .copyright {
        color: rgba(0, 0, 0, 0.45);
        font-size: 14px;
      }
    }

    .loginbox {
      width: 1000px;
      height: 570px;
      margin: 0 auto;
      .title {
        margin: 14px 0;
        .title_up {
          font-size: 18px;
          font-weight: bold;
          color: #1e6deb;
          margin-right: 10px;
        }
        .title_down {
          font-size: 12px;
          font-weight: bold;
          color: rgb(194, 192, 192);
        }
      }
      .login_main {
        border-radius: 8px;
        background-color: #fff;
        overflow: hidden;
        -webkit-box-shadow: 0px 20px 80px 0px rgba(0, 0, 0,  9%);
        box-shadow: 0px 20px 80px 0px rgba(0, 0, 0, 9%);
        .loginimg {
          width: 500px;
          height: 573px;
        }
        .login_ipts {
          flex: 1;
        }
      }
      .copyright {
        margin-top: 30px;
        text-align: center;
        color: #babdc1;
      }
    }
  }
}
</style>
